package com.share.rest;

import com.share.bean.TestA;
import com.share.service.PersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

/**
 * @desc:
 * @author:caifan
 * @date:2020/6/3
 */
@RestController
@RequestMapping("/rest")
public class TestRest {

    @Autowired
    PersonService delegateServiceImpl;


    @PostMapping("/test")
    public void test(HttpServletRequest request, TestA test) throws Exception {
        System.out.println(request.getParameterMap());
        System.out.println(request.getInputStream());
        System.out.println(test);
    }

    @GetMapping("/delegate")
    public void delegate(@RequestParam String bizType) {
        delegateServiceImpl.task(bizType);
    }
}
